home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmiSoft / Dev / lang / amigatalk.lha / help / boopsidocs / getfile_gc.doc < prev    next >
Text File  |  1999-10-30  |  8KB  |  268 lines

  1. TABLE OF CONTENTS
  2.  
  3. getfile.gadget/--datasheet--
  4. getfile.gadget/GETFILE_GetClass
  5. getfile.gadget/--datasheet--                                                                                                                                               getfile.gadget/--datasheet--
  6.  
  7.    NAME
  8.        getfile_gc -- create getfile BOOPSI objects
  9.  
  10.    SUPERCLASS
  11.        gadgetclass
  12.  
  13.    DESCRIPTION
  14.        The getfile gadget class is used to get files and drawers from a file
  15.        requester in an easy and consistent way.  It consists of two button
  16.        gadgets, one read-only and one popfile/popdrawer button, that are
  17.        used to select the file(s)/drawer and show the result.
  18.  
  19.        Advantages that this class provides:
  20.  
  21.        > Consistent behaviour and look in all applications using this class
  22.          instead of doing their own file and drawer routines.
  23.  
  24.        > Easy to use.
  25.  
  26.  
  27.     METHODS
  28.        OM_NEW -- Passed to superclass, defaults set, then OM_SET. Children
  29.                  created.
  30.  
  31.        OM_SET -- Passed to superclass, custom tags set.
  32.  
  33.        OM_GET -- Custom tag returned or passed to superclass.
  34.  
  35.        OM_UPDATE -- Passed to superclass, options set then rendered.
  36.  
  37.        OM_DISPOSE -- Children disposed of, then passed to superclass.
  38.  
  39.        GM_RENDER -- Passed to superclass, then children are rendered.
  40.  
  41.        GM_HITTEST -- Overrides superclass, returns GMR_GADGETHIT if within
  42.                  the popfile/drawer button.
  43.  
  44.        GM_HELPTEST -- Overrides superclass, returns GMR_HELPHIT if within
  45.                  the domain of the gadget.
  46.  
  47.        GM_GOACTIVE -- Passed to superclass, passed to popfile/drawer button.
  48.  
  49.        GM_HANDLEINPUT -- Overrides superclass, all input processed.
  50.  
  51.        GM_GOINACTIVE -- Passed to superclass, popfile/drawer button deactivated.
  52.  
  53.        GM_DOMAIN -- Returns GDOMAIN_MINIMUM and GDOMAIN_MAXIMUM dimensions.
  54.  
  55.        GM_KEYACTIVE -- Private method for keyboard control.
  56.  
  57.        GM_KEYINACTIVE -- Private method for keyboard control.
  58.  
  59.        GFILE_REQUEST -- getfile gadget method for invoking the file requester.
  60.  
  61.        GFILE_FREELIST -- getfile gadget method for freeing allocated list
  62.                    of files.
  63.  
  64.     ATTRIBUTES
  65.        Most of these tags operate the same as the ASLFR_#? tags in ASL library.
  66.        See <asl.library/AslRequest> for detailed descriptions.
  67.  
  68.        GETFILE_TitleText (STRPTR)
  69.           Requester title text.
  70.          
  71.           Defaults to NULL.
  72.          
  73.           Applicability is (OM_NEW, OM_SET).
  74.  
  75.        GETFILE_LeftEdge (WORD)
  76.        GETFILE_TopEdge  (WORD)
  77.           Requester placement coordinates.
  78.          
  79.           Defaults to leftedge: 30, topedge: 20.
  80.  
  81.           Applicability is (OM_NEW, OM_SET, OM_GET).
  82.  
  83.        GETFILE_Width  (WORD)
  84.        GETFILE_Height (WORD)
  85.           Requester dimensions.
  86.  
  87.           Default height: 200, width: 300.
  88.  
  89.           Applicability is (OM_NEW, OM_SET, OM_GET).
  90.  
  91.        GETFILE_File (STRPTR)
  92.           Contents of file gadget.
  93.  
  94.           Defaults to NULL.
  95.  
  96.           Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
  97.  
  98.        GETFILE_Drawer (STRPTR)
  99.           Contents of drawer gadget.
  100.  
  101.           Defaults to NULL.
  102.  
  103.           Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
  104.  
  105.        GETFILE_FullFile (STRPTR)
  106.           Complete qualified file name. Replaces GETFILE_Drawer and GETFILE_File.
  107.  
  108.           Defaults to NULL. 
  109.  
  110.           Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
  111.  
  112.        GETFILE_FullFileExpand (BOOL)
  113.           GETFILE_FullFile will give complete file name(s) expanded with
  114.           NameFromLock() to remove relative paths. 
  115.  
  116.           Defaults to TRUE. 
  117.  
  118.           Applicability is (OM_NEW, OM_SET).
  119.  
  120.        GETFILE_Pattern (STRPTR)
  121.           Contents of pattern gadget.
  122.  
  123.           Defaults to "#?".
  124.  
  125.           Applicability is (OM_NEW, OM_SET, OM_GET).
  126.  
  127.        GETFILE_DoSaveMode (BOOL)
  128.           Being used for saving?
  129.  
  130.           Defaults to FALSE.
  131.  
  132.           Applicability is (OM_NEW, OM_SET).
  133.  
  134.        GETFILE_DoMultiSelect (BOOL)
  135.           Do multi-select of files?
  136.  
  137.           Defaults to FALSE.
  138.  
  139.           Applicability is (OM_NEW, OM_SET).
  140.  
  141.        GETFILE_DoPatterns (BOOL)
  142.           Display a Pattern gadget?
  143.  
  144.           Defaults to FALSE.
  145.  
  146.           Applicability is (OM_NEW, OM_SET).
  147.  
  148.        GETFILE_DrawersOnly   (BOOL)
  149.           Don't display files?
  150.  
  151.           Defaults to FALSE.
  152.  
  153.           Applicability is (OM_NEW, OM_SET).
  154.  
  155.        GETFILE_FilterFunc (struct Hook *)
  156.           Function to filter files.
  157.  
  158.           Defaults to none.
  159.  
  160.           Applicability is (OM_NEW, OM_SET).
  161.  
  162.        GETFILE_RejectIcons   (BOOL)
  163.           Display .info files?
  164.  
  165.           Defaults to FALSE.
  166.  
  167.           Applicability is (OM_NEW, OM_SET).
  168.  
  169.        GETFILE_RejectPattern   (UBYTE *)
  170.           Don't display files matching pattern.
  171.  
  172.           Defaults to none.
  173.  
  174.           Applicability is (OM_NEW, OM_SET).
  175.  
  176.        GETFILE_AcceptPattern (UBYTE *)
  177.           Accept only files matching pattern.
  178.  
  179.           Defaults to none.
  180.  
  181.           Applicability is (OM_NEW, OM_SET).
  182.  
  183.        GETFILE_FilterDrawers (BOOL)
  184.           Also filter drawers with pattern.
  185.  
  186.           Defaults to FALSE.
  187.  
  188.           Applicability is (OM_NEW, OM_SET).
  189.  
  190.        GETFILE_Filelist (struct List *)
  191.           If the GETFILE_DoMultiSelect tags was used, you can get a pointer
  192.           to the list of selected files/drawers using this tag. The ln_Name 
  193.           part of each node will contain the filename/drawername for each 
  194.           selected file with a fully qualified path, even if you didn't use
  195.           the GETFILE_FullFileExpand. 
  196.           In single-selected mode, the list will contain the single selected
  197.           file for notification purposes. Don't forget to free the list using
  198.           the GFILE_FREELIST method! This list is not suitable to be shown 
  199.           directly in a listbrowser gadget without conversion as default, use
  200.           GETFILE_LBNodeStruct for that.
  201.  
  202.           Applicability is (OM_GET, OM_NOTIFY).
  203.  
  204.        GETFILE_LBNodeStruct (BOOL)
  205.           GETFILE_Filelist will give a list with ListBrowserNodes instead of
  206.           normal struct Node node structures. NOTE: This tag requires that
  207.           listbrowser.gadget is installed.
  208.  
  209.           Defaults to FALSE.
  210.  
  211.           Applicability is (OM_NEW).
  212.  
  213.           DO NOT USE THIS TAG YET SINCE SOME INTERNAL ISSUES HAVE NOT BEEN
  214.           SORTED OUT YET!
  215.  
  216.        GETFILE_ReadOnly (BOOL)
  217.           If TRUE, a read-only recessed button gadget is used to present the 
  218.           file/drawer information. If FALSE, an editable string gadget is used.
  219.           The gadget will send the supported attributes in a OM_NOTIFY when a
  220.           this tag is FALSE and the user is finished editing the content of the 
  221.           string gadget. The application can be aware of all changes to the 
  222.           string gadget by setting ICA_TARGET to TARGET_IDCMP for this 
  223.           getfile gadget instance and watching IDCMP_IDCMPUPDATE messages.
  224.           See the provided example program for an example on how this can be
  225.           done.
  226.  
  227.           Defaults to TRUE.
  228.  
  229.           Applicability is (OM_NEW).
  230. getfile.gadget/GETFILE_GetClass                                                                                                                                         getfile.gadget/GETFILE_GetClass
  231.  
  232.    NAME
  233.        GETFILE_GetClass -- Gets the pointer to the file requester class
  234.  
  235.    SYNOPSIS
  236.        getfile_class = GETFILE_GetClass();
  237.        D0
  238.  
  239.        Class * GETFILE_GetClass( void );
  240.  
  241.    FUNCTION
  242.        Obtains the pointer to the getfile gadget class for use with
  243.        NewObject().  This function always returns a valid pointer so
  244.        you do not need to check it.  The reason is that if the library
  245.        opens fine, then the pointer returned is already setup.  (Of course
  246.        this implies that if opening the library fails, you shouldn't be
  247.        calling this.)
  248.  
  249.        Note that this function does not create the class, that is done
  250.        when the class library is opened.
  251.  
  252.    INPUTS
  253.  
  254.    RESULT
  255.        getfile_class - Pointer to the getfile gadget class.
  256.  
  257.    EXAMPLE
  258.  
  259.    NOTES
  260.        The GFILE_REQUEST method will return 0 if no file is selected and
  261.        the GETFILE_DrawersOnly tag is not used, even is the user selected
  262.        the positive response in the requester. If a file is selected (the
  263.        file gadget in the file requester is not empty), it will return 1.
  264.  
  265.    BUGS
  266.  
  267.    SEE ALSO
  268.